1. Field of the Invention
The present invention relates to a moving image encoding apparatus, a method of controlling the same, and a computer readable storage medium.
2. Description of the Related Art
Encoding methods called MPEG-1 and MPEG-2 have recently been established as a technique of efficiently encoding moving image data. A digitized moving image has an enormous data amount. For this reason, research is continuously being conducted to develop a moving image encoding method expected to implement compression at a ratio higher than in the above-described MPEG-1 and MPEG-2. The ITU-T (International Telecommunication Union-Telecommunication Standardization Sector) and the ISO (International Organization for Standardization) have recently standardized an encoding method called H.264/MPEG-4 part10 (to be referred to as H.264 hereinafter). H.264 needs a larger calculation amount in encoding or decoding as compared to the conventional encoding methods such as MPEG-1 and MPEG-2 but is known to implement a higher encoding efficiency.
H.264 uses a prediction method called intra-prediction to predict pixel values in the same frame using intra-frame pixel values. This intra-prediction has a plurality of intra-prediction modes and selectively uses them, as defined. Selecting an intra-prediction mode suitable for an input image allows for the generation of encoded data that suffers little deterioration at a high compression ratio.
When an input image has a pattern such that the values of continuous pixels gradually change in a frame, intra-prediction is difficult, as is known. To cope with this, there has been proposed a method of estimating the direction of the intra-prediction mode in accordance with the direction of pixel value change (Japanese Patent Laid-Open No. 2008-245088).